<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>

	<head>
		<title>审批流程</title>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>libs/bootstrap-3.3.7-dist/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/reset.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/style.css">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/iframe.css">
	</head>

	<body>
		<div id="mainContent">
			<div id="mainContent_content">
				<div class="page_header">
					<a>审批流程</a>
				</div>

				<div class="search">
					<form class="form" action="<%=basePath %>auditFlow/listAllFlow.do" method="post">
						<p>
							<label>流程名称</label>
							<input type="text" name="auditFlowName" value="${auditFlow.auditFlowName }" class="form-control"></input>

							<label>状态</label>
							<select name="status" class="form-control select">
								<option value="">全部</option>
								<option value="0" <c:if test="${auditFlow.status=='0'}">selected</c:if>>正常</option>
								<option value="1" <c:if test="${auditFlow.status=='1'}">selected</c:if>>关闭</option>
							</select>

							<span class="btn">
							<input type="submit" value="查询"  class="btn btn1"></input>
							<input type="button" value="清空" onclick="clearSearchParam();"  class="btn btn2"></input>
						</span>
						</p>
					</form>
				</div>
				<div class="tableBox box">
					<table class="table table-bordered table_text_center">
						<thead>
							<tr>
								<th>序号</th>
								<th>审批流程名称</th>
								<th>是否允许跨级</th>
								<th>状态</th>
								<th>最后处理人</th>
								<th>最后处理时间</th>
								<th style="width:150px;">操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${auditFlowList }" var="flow" varStatus="ids">
								<tr>
									<td>${ids.count }</td>
									<td>${flow.auditFlowName }</td>
									<td>${flow.isSkipLevel==0?"不允许":flow.isSkipLevel==1?"允许":"" }</td>
									<td>${flow.status==0?"正常":"关闭" }</td>
									<td>${flow.lastPersonName }</td>
									<td>${flow.lastProcessingTime.substring(0,19) }</td>
									<td>
										<a class="btn btn-xs btn1" onclick="editFlow(${flow.auditFlowID });">编辑</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</div>

			</div>
			<jsp:include page="/jsp/basic/prompt.jsp"></jsp:include>
		</div>
		<script src="<%=basePath %>js/jquery-3.2.1.min.js"></script>
		<script src="<%=basePath %>libs/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
		<script src="<%=basePath %>My97DatePickers/WdatePicker.js"></script>
		<script src="<%=basePath %>js/public.js"></script>
		<script type="text/javascript">
			function clearSearchParam() {
				$(".search input:text").val("");
				$(".search select").val("");
			}

			function editFlow(id) {
				location.href = "<%=basePath %>auditFlow/toEditFlow.do?auditFlowID=" + id;
			}
		</script>
	</body>

</html>